//
//  HomeViewController.m
//  TipsProject
//
//  Created by Suny on 15/5/7.
//  Copyright (c) 2015年 Suny. All rights reserved.
//

#import "HomeViewController.h"
#import "SlideTabContainerController.h"
#import "ContentViewController.h"
#import "UIBarButtonItem+BaseFramework.h"
#import "SlideTabInfo.h"

#import "TipAbstractListViewController.h"
@interface HomeViewController ()

@end

@implementation HomeViewController

- (id)init
{
	self = [super init];
	if (self)
	{
		NSMutableArray *tabInfoArray = [NSMutableArray array];
		
		SlideTabInfo *slideTableInfo = [[SlideTabInfo alloc] init];
		slideTableInfo.tabTitle = @"热门";
		slideTableInfo.tabId = @"hot";
		slideTableInfo.viewController = [TipAbstractListViewController class];
		
		[tabInfoArray addObject:slideTableInfo];
		
		slideTableInfo = [[SlideTabInfo alloc] init];
		slideTableInfo.tabTitle =  @"关注";
		slideTableInfo.tabId = @"interested";

		slideTableInfo.viewController = [TipAbstractListViewController class];

		[tabInfoArray addObject:slideTableInfo];
		
//		slideTableInfo = [[SlideTabInfo alloc] init];
//		slideTableInfo.tabTitle = @"explore";
//		slideTableInfo.viewController = [ContentViewController class];
//
//		[tabInfoArray addObject:slideTableInfo];
		
		self.tabInfoArray = tabInfoArray;
		
	}
	
	return self;
} 

- (void)viewDidLoad 
{
    [super viewDidLoad];
    // Do any additional setup after loading the view.
	
	[self setNavigationTitle:@"Tips"];
	
	self.view.height -= self.customTabViewController.tabBarHeight;
	
	UIBarButtonItem *left = [UIBarButtonItem leftBarButtonItemWithImageName:@"add_friend_icon"
																	 target:self
																   selector:@selector(handleTapLeftBarButtonItem)];
	
	UIBarButtonItem *right = [UIBarButtonItem rightBarButtonItemWithImageName:@"nav_menu_gray_button"
																	   target:self
																	 selector:@selector(handleTapRightBarButtonItem)];
	
	self.navigationItem.leftBarButtonItem = left;
	self.navigationItem.rightBarButtonItem = right;
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

- (void)handleTapLeftBarButtonItem
{
	
}

- (void)handleTapRightBarButtonItem
{
	
}
@end
